home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Patches / FoundationUserPatch.pkg / FoundationUserPatch.post_install < prev    next >
Text File  |  1994-12-12  |  675b  |  28 lines

  1. #!/bin/csh -f
  2.  
  3. # FoundationUserPatch.post_install
  4.  
  5. echo ""
  6.  
  7. echo -n "        Checking localtime file ... "
  8. set zonedir  = /private/etc/zoneinfo
  9. set timefile = $zonedir/localtime
  10. if ( ! -f $timefile ) then
  11.     echo "$timefile does not exist."
  12.     exit 1
  13. endif
  14. echo "OK."
  15.  
  16. /bin/test -h $timefile
  17. if ( $status ) then
  18.     echo -n "        Changing localtime file ... "
  19.     set inode = `/bin/ls -i $timefile | /bin/awk '{print $1}'` || exit 1
  20.     /bin/rm -f $timefile || exit 1
  21.     set link = `/bin/ls -i1 $zonedir | /bin/grep $inode | /bin/awk '{print $2}'` || exit 1
  22.     chdir $zonedir; /bin/ln -s $link ${timefile:t} || exit 1
  23.     echo "OK."
  24. endif
  25.  
  26. echo "    ... done."
  27. exit 0
  28.